package com.kuizii.auth.shiro;

import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationListener;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.stereotype.Component;

@Component
public class KuiziiAuthenticationListener implements AuthenticationListener {
    @Override
    public void onSuccess(AuthenticationToken authenticationToken, AuthenticationInfo authenticationInfo) {

    }

    @Override
    public void onFailure(AuthenticationToken authenticationToken, AuthenticationException e) {
        System.out.println("登陆失败");
        e.printStackTrace();
    }

    @Override
    public void onLogout(PrincipalCollection principalCollection) {

    }
}
